package file;

import java.io.File;
import java.io.FileFilter;

public class Test3 {
    public static void main(String[] args) {
        File file = new File(".");
        FileFilter filter = p -> p.getName().contains("a");

        File[] files = file.listFiles(filter);
        for (File sub : files) {
            System.out.println(sub.getName());
        }

    }
}
